feat(rewards): update mUSD calculator tab with slider and revamped design#29758
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
|
I have read the CLA Document and I hereby sign the CLA |
Format slider scale anchors with useFiatFormatter; remove scale_* locale keys. Remove non-English placeholder strings for new musd copy (en.json only for Crowdin). Tests: mock gesture-handler and fiat formatter; assert scale labels via testIDs. Cursor bug fixes from implementation review.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 71da2ac. Configure here.
Parameterize disclaimer_calculator with {{apy}} and pass MUSD_CONVERSION_APY; document constant in musd.ts.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
No E2E tests exist for the Rewards/mUSD calculator feature — a thorough search of the tests/ directory found no test files referencing rewards, mUSD, or the calculator. The Rewards feature is not covered by any of the available E2E test tags. No shared components are modified: TabBar, navigation primitives, modals, confirmations, controllers, and Engine are all untouched. The swap button in MusdCalculatorTab uses useSwapBridgeNavigation for navigation only — it doesn't modify the swap flow itself. Risk is low: These are isolated UI changes to a feature with no existing E2E coverage. Running any test suite would not validate these changes, and the changes cannot break existing tests since no shared infrastructure is modified. Performance Test Selection: |
|




Description
This PR replaces the placeholder mUSD Rewards tab with a calculator-style experience so users can explore estimated earnings from holding mUSD.
The tab now shows a hero (hold / earn messaging), an amount slider with labeled scale points ($100–$10,000), estimated yearly / monthly / daily earnings derived from a fixed APY constant, disclaimer copy, and primary CTAs (buy / swap). Slider mapping, snapping, and clamping live in pure helpers (
musdCalculatorSlider) with unit tests. Strings are added underrewards.musd.*across supported locales.Changelog
CHANGELOG entry: Updated the mUSD bonus calculator in Rewards with a fresh design.
Related issues
No issue: Rewards mUSD calculator UI iteration (no GitHub or Jira ticket linked).
Manual testing steps
Screenshots/Recordings
Before
N/A
After
N/A
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Medium Risk
Medium risk due to a substantial UI rewrite introducing custom gesture-driven slider behavior (Reanimated/Gesture Handler) and new i18n keys, which could affect interaction/formatting and non-English copy if translations are incomplete.
Overview
Replaces the Rewards mUSD calculator tab UI with a new slider-driven experience: a redesigned hero/earnings display, editable amount input, and a custom press/drag slider (with snapping/clamping) that updates estimated daily/yearly earnings.
Adds pure slider mapping helpers in
musdCalculatorSlider(with unit tests), updates button wiring/testIDs and interaction tests (press, pan gestures, input normalization), and wrapsMusdCalculatorViewcontent in aKeyboardAvoidingViewwith a new test.Updates
rewards.musd.*strings (new English copy/keys) and removes the prior localized string set in many non-English locale files.Reviewed by Cursor Bugbot for commit fb1b788. Bugbot is set up for automated code reviews on this repo. Configure here.